package com.atguigu.service.impl;

import com.atguigu.dao.VhostDao;
import com.atguigu.dao.impl.VhostDaoImpl;
import com.atguigu.pojo.Vhost;
import com.atguigu.service.VhostService;
import com.atguigu.utils.WebUtils;

import java.util.List;

public class VhostServiceImpl implements VhostService {
    VhostDao vhostDao=new VhostDaoImpl();
    @Override
    public void addVhost(Vhost vhost) {
        vhostDao.addVhost(vhost);
    }

    @Override
    public void deleteVhostByVhostId(String vhostId) {
        vhostDao.deleteVhostByVhostId(vhostId);
    }

    @Override
    public List<Vhost> queryVhostsByServiceId(String serviceId) {
        return vhostDao.queryVhostsByServiceId(serviceId);
    }

    @Override
    public List<Vhost> queryVhostsByServiceIdAndPort(String serviceId, String port) {
        return vhostDao.queryVhostsByServiceIdAndPort(serviceId,port);
    }
}
